package com.publiccms.entities.cms;

// Generated 2016-3-2 16:22:41 by Hibernate Tools 4.3.1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.sanluan.common.generator.annotation.GeneratorColumn;

/**
 * CmsVoteUser generated by hbm2java
 */
@Entity
@Table(name = "cms_vote_user")
public class CmsVoteUser implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    @GeneratorColumn(title = "ID")
    private Long id;
    @GeneratorColumn(title = "投票", condition = true)
    private int voteId;
    @GeneratorColumn(title = "用户", condition = true)
    private long userId;
    @GeneratorColumn(title = "选项")
    private String itemIds;
    @GeneratorColumn(title = "IP", condition = true)
    private String ip;
    @GeneratorColumn(title = "创建日期", condition = true, order = true)
    private Date createDate;

    public CmsVoteUser() {
    }

    public CmsVoteUser(int voteId, long userId, String itemIds, String ip, Date createDate) {
        this.voteId = voteId;
        this.userId = userId;
        this.itemIds = itemIds;
        this.ip = ip;
        this.createDate = createDate;
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "vote_id", nullable = false)
    public int getVoteId() {
        return this.voteId;
    }

    public void setVoteId(int voteId) {
        this.voteId = voteId;
    }

    @Column(name = "user_id", nullable = false)
    public long getUserId() {
        return this.userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @Column(name = "item_ids", nullable = false, length = 65535)
    public String getItemIds() {
        return this.itemIds;
    }

    public void setItemIds(String itemIds) {
        this.itemIds = itemIds;
    }

    @Column(name = "ip", nullable = false, length = 64)
    public String getIp() {
        return this.ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_date", nullable = false, length = 19)
    public Date getCreateDate() {
        return this.createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

}
